package org.framework.common.api.service.dao;

import java.util.List;

import org.framework.common.api.entity.CommonMessage;
import org.framework.common.api.service.repository.CommonRepositoryAware;
import org.springframework.data.jpa.repository.Query;

public interface CommonMessageDao extends CommonRepositoryAware<CommonMessage, String> {

	/**
	 * 读取未读消息.
	 * @return
	 * @throws Exception
	 * @author chanlong(陈龙)
	 * @date 2016年5月16日 下午7:53:13
	 */
	@Query("from CommonMessage o where o.status = '0' order by createDate desc")
	public List<CommonMessage> unreader() throws Exception;

}
